<?php


namespace App\Model;


use Carbon\Carbon;

/**
 * @property int id
 * @property int user_id
 * @property int cooperative_id
 * @property string avatar
 * @property int credit_point
 * @property int shop_point
 * @property float balance
 * @property int status
 * @property User user
 * @property Carbon created_at
 */
class UserEmployer extends Model
{
    protected $table = 'user_employer';
    protected $primaryKey = 'id';

    protected $fillable = ['user_id', 'cooperative_id', 'status', 'credit_point', 'shop_point'];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function tasks()
    {
        return $this->hasMany(Task::class,'employer_id');
    }
}